# Copyright 2020 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load(
    "//bazel:grpc_build_system.bzl",
    "grpc_cc_library",
    "grpc_cc_proto_library",
    "grpc_cc_test",
    "grpc_internal_proto_library",
    "grpc_package",
)
load("//test/core/test_util:grpc_fuzzer.bzl", "grpc_fuzz_test")
load("//test/cpp/microbenchmarks:grpc_benchmark_config.bzl", "HISTORY", "grpc_cc_benchmark")

grpc_package(
    name = "test/core/xds",
    features = [
        "layering_check",
        "parse_headers",
    ],
)

licenses(["notice"])

grpc_cc_test(
    name = "xds_bootstrap_test",
    srcs = ["xds_bootstrap_test.cc"],
    external_deps = [
        "gtest",
        "absl/status",
        "absl/status:statusor",
        "absl/strings",
        "absl/strings:str_format",
    ],
    uses_event_engine = False,
    uses_polling = False,
    deps = [
        "//:config",
        "//:gpr",
        "//:grpc",
        "//:grpc_core_credentials_header",
        "//:ref_counted_ptr",
        "//:xds_client",
        "//src/core:certificate_provider_factory",
        "//src/core:channel_creds_registry",
        "//src/core:env",
        "//src/core:grpc_xds_client",
        "//src/core:json",
        "//src/core:json_args",
        "//src/core:json_object_loader",
        "//src/core:json_reader",
        "//src/core:validation_errors",
        "//src/core:xds_certificate_provider_store",
        "//src/core:xds_server_grpc",
        "//test/core/test_util:grpc_test_util",
        "//test/core/test_util:scoped_env_var",
    ],
)

grpc_cc_test(
    name = "certificate_provider_store_test",
    srcs = ["certificate_provider_store_test.cc"],
    external_deps = [
        "absl/log:check",
        "gtest",
    ],
    uses_event_engine = False,
    uses_polling = False,
    deps = [
        "//:config",
        "//:gpr",
        "//:grpc",
        "//src/core:grpc_check",
        "//src/core:grpc_xds_client",
        "//src/core:unique_type_name",
        "//src/core:xds_certificate_provider_store",
        "//test/core/test_util:grpc_test_util",
    ],
)

grpc_cc_test(
    name = "file_watcher_certificate_provider_factory_test",
    srcs = ["file_watcher_certificate_provider_factory_test.cc"],
    external_deps = [
        "absl/status",
        "absl/status:statusor",
        "absl/strings:str_format",
        "gtest",
    ],
    uses_event_engine = False,
    uses_polling = False,
    deps = [
        "//:gpr",
        "//:grpc",
        "//src/core:json_reader",
        "//src/core:xds_file_watcher_certificate_provider_factory",
        "//test/core/test_util:grpc_test_util",
        "//test/core/test_util:scoped_env_var",
    ],
)

grpc_cc_test(
    name = "xds_certificate_provider_test",
    srcs = ["xds_certificate_provider_test.cc"],
    data = [
        "//test/core/credentials/transport/tls/test_data:spiffe/client_spiffebundle.json",
        "//test/core/credentials/transport/tls/test_data:spiffe/test_bundles/spiffebundle2.json",
    ],
    external_deps = [
        "gtest",
        "absl/functional:overload",
        "absl/base:no_destructor",
        "absl/status",
    ],
    uses_event_engine = False,
    uses_polling = False,
    deps = [
        "//:gpr",
        "//:grpc",
        "//:tsi_ssl_credentials",
        "//src/core:error",
        "//src/core:match",
        "//src/core:ssl_transport_security_utils",
        "//src/core:status_helper",
        "//src/core:useful",
        "//src/core:xds_certificate_provider",
        "//test/core/test_util:grpc_test_util",
    ],
)

grpc_cc_test(
    name = "xds_lb_policy_registry_test",
    srcs = ["xds_lb_policy_registry_test.cc"],
    external_deps = [
        "@com_google_protobuf//upb/mem",
        "@com_google_protobuf//upb/reflection",
        "gtest",
        "absl/status",
        "absl/status:statusor",
    ],
    uses_event_engine = False,
    uses_polling = False,
    deps = [
        "//:config",
        "//:gpr",
        "//:grpc",
        "//:orphanable",
        "//:ref_counted_ptr",
        "//src/core:grpc_xds_client",
        "//src/core:json_writer",
        "//src/core:lb_policy",
        "//src/core:lb_policy_factory",
        "//src/core:validation_errors",
        "//test/core/test_util:grpc_test_util",
        "//test/core/test_util:scoped_env_var",
        "//test/cpp/util:grpc_cli_utils",
        "@com_github_cncf_xds//xds/type/v3:pkg_cc_proto",
        "@com_google_protobuf//:any_cc_proto",
        "@com_google_protobuf//:duration_cc_proto",
        "@com_google_protobuf//:struct_cc_proto",
        "@com_google_protobuf//:wrappers_cc_proto",
        "@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
        "@envoy_api//envoy/config/core/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/load_balancing_policies/pick_first/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/load_balancing_policies/ring_hash/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/load_balancing_policies/round_robin/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/load_balancing_policies/wrr_locality/v3:pkg_cc_proto",
    ],
)

grpc_cc_test(
    name = "xds_audit_logger_registry_test",
    srcs = ["xds_audit_logger_registry_test.cc"],
    external_deps = [
        "absl/status",
        "absl/status:statusor",
        "absl/strings:str_format",
        "absl/strings:string_view",
        "gtest",
        "@com_google_protobuf//upb/mem",
        "@com_google_protobuf//upb/reflection",
    ],
    uses_event_engine = False,
    uses_polling = False,
    deps = [
        "//:gpr",
        "//:grpc",
        "//src/core:grpc_audit_logging",
        "//src/core:grpc_xds_client",
        "//src/core:json",
        "//src/core:json_writer",
        "//test/core/test_util:grpc_test_util",
        "//test/cpp/util:grpc_cli_utils",
        "@com_github_cncf_xds//xds/type/v3:pkg_cc_proto",
        "@com_google_protobuf//:any_cc_proto",
        "@com_google_protobuf//:struct_cc_proto",
        "@envoy_api//envoy/config/rbac/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/filters/http/rbac/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/rbac/audit_loggers/stream/v3:pkg_cc_proto",
    ],
)

grpc_cc_library(
    name = "xds_transport_fake",
    testonly = True,
    srcs = ["xds_transport_fake.cc"],
    hdrs = ["xds_transport_fake.h"],
    external_deps = [
        "absl/log:check",
        "absl/log:log",
        "absl/strings",
        "absl/base:core_headers",
        "absl/status",
        "absl/time",
    ],
    deps = [
        "//:event_engine_base_hdrs",
        "//:exec_ctx",
        "//:gpr_platform",
        "//:orphanable",
        "//:ref_counted_ptr",
        "//:xds_client",
        "//src/core:grpc_check",
        "//src/core:ref_counted",
        "//src/core:sync",
        "//test/core/event_engine/fuzzing_event_engine",
        "//test/core/test_util:grpc_test_util",
    ],
)

grpc_cc_library(
    name = "xds_client_test_peer",
    hdrs = ["xds_client_test_peer.h"],
    external_deps = [
        "absl/functional:function_ref",
        "absl/strings",
    ],
    deps = [
        "//:gpr",
        "//:xds_client",
    ],
)

grpc_cc_test(
    name = "xds_client_test",
    srcs = ["xds_client_test.cc"],
    external_deps = [
        "gtest",
        "absl/strings",
        "absl/time",
        "@com_google_protobuf//upb/reflection",
    ],
    uses_event_engine = True,
    uses_polling = False,
    deps = [
        ":xds_client_test_peer",
        ":xds_transport_fake",
        "//:debug_location",
        "//:gpr",
        "//:grpc",
        "//:grpc++_codegen_proto",
        "//:grpc++_config_proto",
        "//:grpc_base",
        "//:iomgr_timer",
        "//:xds_client",
        "//src/core:json",
        "//src/core:json_args",
        "//src/core:json_object_loader",
        "//src/core:json_reader",
        "//src/core:json_writer",
        "//src/core:match",
        "//src/core:sync",
        "//src/core:wait_for_single_owner",
        "//test/core/event_engine:event_engine_test_utils",
        "//test/core/event_engine/fuzzing_event_engine",
        "//test/core/test_util:grpc_test_util",
        "//test/core/test_util:scoped_env_var",
        "@com_google_protobuf//:any_cc_proto",
        "@com_google_protobuf//:struct_cc_proto",
        "@envoy_api//envoy/config/core/v3:pkg_cc_proto",
        "@envoy_api//envoy/service/discovery/v3:pkg_cc_proto",
        "@envoy_api//envoy/service/status/v3:pkg_cc_proto",
    ],
)

grpc_internal_proto_library(
    name = "xds_client_fuzzer_proto",
    srcs = [
        "xds_client_fuzzer.proto",
    ],
    deps = [
        "//test/core/event_engine/fuzzing_event_engine:fuzzing_event_engine_proto",
        "@envoy_api//envoy/service/discovery/v3:pkg",
    ],
)

grpc_cc_proto_library(
    name = "xds_client_fuzzer_cc_proto",
    deps = [
        "xds_client_fuzzer_proto",
    ],
)

grpc_fuzz_test(
    name = "xds_client_fuzzer",
    srcs = ["xds_client_fuzzer.cc"],
    external_deps = [
        "absl/log:log",
        "fuzztest",
        "fuzztest_main",
        "gtest",
        "absl/status",
        "absl/status:statusor",
        "absl/strings",
        "absl/time",
    ],
    tags = ["no_windows"],
    deps = [
        ":xds_client_test_peer",
        ":xds_transport_fake",
        "//:grpc",
        "//:iomgr_timer",
        "//:orphanable",
        "//:ref_counted_ptr",
        "//:xds_client",
        "//src/core:grpc_xds_client",
        "//src/core:wait_for_single_owner",
        "//src/core:xds_cluster",
        "//src/core:xds_endpoint",
        "//src/core:xds_listener",
        "//src/core:xds_route_config",
        "//test/core/test_util:grpc_test_util",
        "//test/core/event_engine/fuzzing_event_engine",
        "//test/core/event_engine:event_engine_test_utils",
        "xds_client_fuzzer_cc_proto",
        # These proto deps are needed to ensure that we can read these
        # resource types out of the google.protobuf.Any fields in the
        # textproto files in the corpora.
        "@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
        "@envoy_api//envoy/config/endpoint/v3:pkg_cc_proto",
        "@envoy_api//envoy/config/listener/v3:pkg_cc_proto",
        "@envoy_api//envoy/config/route/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/filters/http/router/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/filters/network/http_connection_manager/v3:pkg_cc_proto",
        "@envoy_api//envoy/service/discovery/v3:pkg_cc_proto",
        "@com_google_protobuf//:protobuf",
    ],
)

grpc_cc_test(
    name = "xds_common_types_test",
    srcs = ["xds_common_types_test.cc"],
    external_deps = [
        "gtest",
        "absl/status",
        "absl/status:statusor",
        "absl/strings:str_format",
        "re2",
        "@com_google_protobuf//upb/mem",
        "@com_google_protobuf//upb/reflection",
    ],
    uses_event_engine = False,
    uses_polling = False,
    deps = [
        "//:envoy_extensions_transport_sockets_tls_upb",
        "//:gpr",
        "//:grpc",
        "//:grpc_trace",
        "//:protobuf_any_upb",
        "//:protobuf_duration_upb",
        "//:ref_counted_ptr",
        "//:xds_client",
        "//src/core:grpc_matchers",
        "//src/core:grpc_xds_client",
        "//src/core:json_writer",
        "//src/core:time",
        "//src/core:upb_utils",
        "//src/core:validation_errors",
        "//src/core:xds_common_types",
        "//test/core/test_util:grpc_test_util",
        "//test/cpp/util:grpc_cli_utils",
        "@com_github_cncf_xds//udpa/type/v1:pkg_cc_proto",
        "@com_github_cncf_xds//xds/type/v3:pkg_cc_proto",
        "@com_google_protobuf//:struct_cc_proto",
        "@com_google_protobuf//:wrappers_cc_proto",
        "@envoy_api//envoy/extensions/transport_sockets/tls/v3:pkg_cc_proto",
        "@envoy_api//envoy/type/matcher/v3:pkg_cc_proto",
    ],
)

grpc_cc_test(
    name = "xds_metadata_test",
    srcs = ["xds_metadata_test.cc"],
    external_deps = [
        "gtest",
        "absl/status",
        "absl/status:statusor",
        "absl/strings:str_format",
    ],
    uses_event_engine = False,
    uses_polling = False,
    deps = [
        "//:gpr",
        "//:grpc",
        "//:grpc_trace",
        "//:ref_counted_ptr",
        "//:xds_client",
        "//src/core:grpc_xds_client",
        "//src/core:json",
        "//src/core:json_writer",
        "//src/core:xds_metadata",
        "//test/core/test_util:grpc_test_util",
        "@com_google_protobuf//:any_cc_proto",
        "@com_google_protobuf//:struct_cc_proto",
        "@envoy_api//envoy/config/core/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/filters/http/gcp_authn/v3:pkg_cc_proto",
    ],
)

grpc_cc_benchmark(
    name = "bm_xds_matcher_test",
    srcs = ["bm_xds_matcher_test.cc"],
    external_deps = [
        "absl/strings",
    ],
    monitoring = HISTORY,
    deps = [
        "//src/core:down_cast",
        "//src/core:grpc_matchers",
        "//src/core:grpc_xds_client",
        "//test/core/test_util:grpc_test_util",
    ],
)

grpc_cc_test(
    name = "xds_matcher_test",
    srcs = ["xds_matcher_test.cc"],
    external_deps = [
        "gtest",
        "absl/strings",
    ],
    uses_event_engine = False,
    uses_polling = False,
    deps = [
        "//src/core:down_cast",
        "//src/core:grpc_matchers",
        "//src/core:grpc_xds_client",
        "//test/core/test_util:grpc_test_util",
    ],
)

grpc_cc_test(
    name = "xds_matcher_parse_test",
    srcs = ["xds_matcher_parse_test.cc"],
    external_deps = [
        "gtest",
        "@com_google_protobuf//upb/mem",
        "@com_google_protobuf//upb/reflection",
    ],
    uses_event_engine = False,
    uses_polling = False,
    deps = [
        "//:xds_client",
        "//:xds_type_matcher_upb",
        "//src/core:down_cast",
        "//src/core:grpc_xds_client",
        "//src/core:upb_utils",
        "//src/core:validation_errors",
        "//test/core/test_util:grpc_test_util",
        "@com_github_cncf_xds//xds/type/matcher/v3:pkg_cc_proto",
        "@com_github_cncf_xds//xds/type/v3:pkg_cc_proto",
        "@com_google_protobuf//:protobuf",
        "@com_google_protobuf//:wrappers_cc_proto",
        "@com_google_protobuf//:wrappers_upb_proto",
        "@envoy_api//envoy/config/common/matcher/v3:pkg_cc_proto",
        "@envoy_api//envoy/type/matcher/v3:pkg_cc_proto",
    ],
)

grpc_cc_test(
    name = "xds_http_filters_test",
    srcs = ["xds_http_filters_test.cc"],
    external_deps = [
        "absl/log:check",
        "absl/status",
        "absl/strings",
        "absl/strings:str_format",
        "gtest",
        "@com_google_protobuf//upb/mem",
        "@com_google_protobuf//upb/reflection",
    ],
    uses_event_engine = False,
    uses_polling = False,
    deps = [
        "//:gpr",
        "//:grpc",
        "//:grpc++",
        "//:grpc++_codegen_proto",
        "//:grpc++_config_proto",
        "//:grpc++_public_hdrs",
        "//:grpc_trace",
        "//:ref_counted_ptr",
        "//:xds_client",
        "//src/core:error",
        "//src/core:gcp_authentication_filter",
        "//src/core:grpc_check",
        "//src/core:grpc_fault_injection_filter",
        "//src/core:grpc_rbac_filter",
        "//src/core:grpc_stateful_session_filter",
        "//src/core:grpc_xds_client",
        "//src/core:json_writer",
        "//src/core:xds_http_filter",
        "//test/core/test_util:grpc_test_util",
        "//test/core/test_util:scoped_env_var",
        "//test/cpp/util:grpc_cli_utils",
        "@com_github_cncf_xds//xds/type/v3:pkg_cc_proto",
        "@com_google_protobuf//:any_cc_proto",
        "@com_google_protobuf//:duration_cc_proto",
        "@com_google_protobuf//:protobuf",
        "@com_google_protobuf//:wrappers_cc_proto",
        "@envoy_api//envoy/config/core/v3:pkg_cc_proto",
        "@envoy_api//envoy/config/rbac/v3:pkg_cc_proto",
        "@envoy_api//envoy/config/route/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/filters/common/fault/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/filters/http/fault/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/filters/http/gcp_authn/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/filters/http/rbac/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/filters/http/router/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/filters/http/stateful_session/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/http/stateful_session/cookie/v3:pkg_cc_proto",
        "@envoy_api//envoy/type/http/v3:pkg_cc_proto",
        "@envoy_api//envoy/type/matcher/v3:pkg_cc_proto",
        "@envoy_api//envoy/type/v3:pkg_cc_proto",
    ],
)

grpc_cc_test(
    name = "xds_listener_resource_type_test",
    srcs = ["xds_listener_resource_type_test.cc"],
    external_deps = [
        "gtest",
        "absl/status",
        "absl/status:statusor",
        "absl/strings",
        "absl/strings:str_format",
        "@com_google_protobuf//upb/mem",
        "@com_google_protobuf//upb/reflection",
    ],
    uses_event_engine = False,
    uses_polling = False,
    deps = [
        "//:gpr",
        "//:grpc",
        "//:grpc++_codegen_proto",
        "//:grpc_trace",
        "//:ref_counted_ptr",
        "//:sockaddr_utils",
        "//:xds_client",
        "//src/core:error",
        "//src/core:grpc_xds_client",
        "//src/core:json",
        "//src/core:json_writer",
        "//src/core:time",
        "//src/core:xds_common_types",
        "//src/core:xds_listener",
        "//test/core/test_util:grpc_test_util",
        "//test/cpp/util:grpc_cli_utils",
        "@com_github_cncf_xds//xds/type/v3:pkg_cc_proto",
        "@com_google_protobuf//:any_cc_proto",
        "@com_google_protobuf//:duration_cc_proto",
        "@com_google_protobuf//:wrappers_cc_proto",
        "@envoy_api//envoy/config/core/v3:pkg_cc_proto",
        "@envoy_api//envoy/config/listener/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/filters/http/fault/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/filters/http/rbac/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/filters/http/router/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/filters/network/http_connection_manager/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/transport_sockets/tls/v3:pkg_cc_proto",
        "@envoy_api//envoy/type/matcher/v3:pkg_cc_proto",
    ],
)

grpc_cc_test(
    name = "xds_route_config_resource_type_test",
    srcs = ["xds_route_config_resource_type_test.cc"],
    external_deps = [
        "gtest",
        "absl/status",
        "absl/status:statusor",
        "absl/strings",
        "absl/strings:str_format",
        "re2",
        "@com_google_protobuf//upb/mem",
        "@com_google_protobuf//upb/reflection",
    ],
    uses_event_engine = False,
    uses_polling = False,
    deps = [
        "//:gpr",
        "//:grpc",
        "//:grpc++_codegen_proto",
        "//:grpc_base",
        "//:grpc_trace",
        "//:ref_counted_ptr",
        "//:xds_client",
        "//src/core:error",
        "//src/core:grpc_matchers",
        "//src/core:grpc_xds_client",
        "//src/core:json_writer",
        "//src/core:time",
        "//src/core:xds_route_config",
        "//src/proto/grpc/lookup/v1:rls_config_cc_proto",
        "//test/core/test_util:grpc_test_util",
        "//test/core/test_util:scoped_env_var",
        "//test/cpp/util:grpc_cli_utils",
        "@com_github_cncf_xds//xds/type/v3:pkg_cc_proto",
        "@com_google_protobuf//:any_cc_proto",
        "@com_google_protobuf//:duration_cc_proto",
        "@com_google_protobuf//:wrappers_cc_proto",
        "@envoy_api//envoy/config/core/v3:pkg_cc_proto",
        "@envoy_api//envoy/config/route/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/filters/http/fault/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/filters/http/rbac/v3:pkg_cc_proto",
        "@envoy_api//envoy/type/matcher/v3:pkg_cc_proto",
        "@envoy_api//envoy/type/v3:pkg_cc_proto",
    ],
)

grpc_cc_test(
    name = "xds_cluster_resource_type_test",
    srcs = ["xds_cluster_resource_type_test.cc"],
    external_deps = [
        "@com_google_protobuf//upb/mem",
        "@com_google_protobuf//upb/reflection",
        "absl/status",
        "absl/status:statusor",
        "absl/strings:str_format",
        "gtest",
    ],
    uses_event_engine = False,
    uses_polling = False,
    deps = [
        "//:gpr",
        "//:grpc",
        "//:grpc++_codegen_proto",
        "//:grpc_trace",
        "//:ref_counted_ptr",
        "//:xds_client",
        "//src/core:error",
        "//src/core:grpc_outlier_detection_header",
        "//src/core:grpc_xds_client",
        "//src/core:json",
        "//src/core:json_writer",
        "//src/core:time",
        "//src/core:xds_cluster",
        "//src/core:xds_common_types",
        "//src/core:xds_health_status",
        "//test/core/test_util:grpc_test_util",
        "//test/core/test_util:scoped_env_var",
        "@com_github_cncf_xds//xds/type/v3:pkg_cc_proto",
        "@com_google_protobuf//:any_cc_proto",
        "@com_google_protobuf//:duration_cc_proto",
        "@com_google_protobuf//:struct_cc_proto",
        "@com_google_protobuf//:wrappers_cc_proto",
        "@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
        "@envoy_api//envoy/config/core/v3:pkg_cc_proto",
        "@envoy_api//envoy/config/endpoint/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/clusters/aggregate/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/filters/http/gcp_authn/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/load_balancing_policies/round_robin/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/load_balancing_policies/wrr_locality/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/transport_sockets/http_11_proxy/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/transport_sockets/tls/v3:pkg_cc_proto",
        "@envoy_api//envoy/extensions/upstreams/http/v3:pkg_cc_proto",
        "@envoy_api//envoy/type/v3:pkg_cc_proto",
    ],
)

grpc_cc_test(
    name = "xds_endpoint_resource_type_test",
    srcs = ["xds_endpoint_resource_type_test.cc"],
    external_deps = [
        "gtest",
        "absl/status",
        "absl/status:statusor",
        "absl/strings:str_format",
        "@com_google_protobuf//upb/mem",
        "@com_google_protobuf//upb/reflection",
    ],
    uses_event_engine = False,
    uses_polling = False,
    deps = [
        "//:endpoint_addresses",
        "//:gpr",
        "//:grpc",
        "//:grpc++_codegen_proto",
        "//:grpc_trace",
        "//:ref_counted_ptr",
        "//:sockaddr_utils",
        "//:xds_client",
        "//src/core:channel_args",
        "//src/core:error",
        "//src/core:grpc_xds_client",
        "//src/core:resolved_address",
        "//src/core:xds_endpoint",
        "//src/core:xds_health_status",
        "//test/core/test_util:grpc_test_util",
        "//test/core/test_util:scoped_env_var",
        "@com_google_protobuf//:wrappers_cc_proto",
        "@envoy_api//envoy/config/core/v3:pkg_cc_proto",
        "@envoy_api//envoy/config/endpoint/v3:pkg_cc_proto",
        "@envoy_api//envoy/type/v3:pkg_cc_proto",
    ],
)
